package com.lhb.aop;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

/**
 * @Program: spring
 * @Description:
 * @Author: LHB
 * @Version: v0.0.1
 * @Time: 2021-09-03 11:15
 **/
public class AOP {
	@Autowired
	private ApplicationContext applicationContext;
	@Test
	public void CalculateAop() {
		System.out.println("ssssssssssssssssssssssssssssss");
		Calculate simpleCalculate = applicationContext.getBean("simpleCalculate", Calculate.class);
		int add = simpleCalculate.add(1, 1);
		System.out.println(add);
	}
}
